limsBatchRevise.searchPage = {

    getGridParam : function() {
        var _this = this;
        return {
            type : 'grid',
            id : 'lims-batch-revise-search-list-grid',
            url : limsBatchRevise.baseUrl + '/queries/searchable',
            columns : limsBatchRevise.getSearchListColumns(),
            onCellClick : function(field, row) {
                field === 'batchCode' && _this.loadDetailPage(row);
            },
            page: true,
        }
    },

    create : function() {
        var _this = this;
        Gikam.create('layout', {
            id : 'lims-batch-revise-search-list-layout',
            renderTo : workspace.window.$dom,
            center : {
                items : [ this.getGridParam() ]
            }
        });
    },

    loadDetailPage : function(row) {
        workspace.window.load(limsBatchRevise.baseUrl + '/page/detail' + Gikam.param({
            id : row.id,
            batchId : row.batchId,
            reviseType : row.reviseType,
            readonly : '1',
            status : row.status,
            processStatus: row.processStatus
        }));
    },

    init : function() {
        this.create();
    }
};
